﻿<!DOCTYPE html>
<html ng-app="contacts" xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>angular Contacts - factory</title>

    <script src="Scripts/angular.min.js"></script>
    <script src="Scripts/angular-ui/ui-bootstrap-tpls.min.js"></script>
    <script src="Scripts/angular-ui/ui-bootstrap.min.js"></script>
    <link href="Content/bootstrap.min.css" rel="stylesheet" />

</head>
<body>

    <div ng-controller="HomeController">{{greeting}}
    <br />

        <div class="container col-sm-6">
            <input class="form-control" type="text" ng-model="userFirst" placeholder="First Name" />
            <input class="form-control" type="text" ng-model="userLast" placeholder="Last Name" />
            <input class="form-control" type="text" ng-model="userId" placeholder="User Name" />

            <button ng-click="doAdd()" class="btn btn-success">{{btnAction}} </button>
        </div>

    <hr />

        <div class="container col-lg-6">
            <div ng-repeat="c in listContacts">
                <div>{{$index}} - {{c.fName}}, {{c.lName}}, {{c.uName}} 
                    <button ng-click="startEdit($index)">Edit</button>
                </div>
            </div>
         </div>
            <!--
        fName: "Andrew"
        lName: "B"
        uName: "AndrewB"
                 -->
        </div>

    <script src="app/app.js"></script>
    <script src="app/services/ContactsService.js"></script>
    <script src="app/controllers/HomeController.js"></script>
</body>
</html>
